﻿using System;
using Assignment3.localhost;

namespace Assignment3
{
    public partial class TryPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void invokeCrimeDataButton_Click(object sender, EventArgs e)
        {
            localhost1.Service1 service = new localhost1.Service1();           

            crimeDataTextBox.Text = service.CrimeData(DateTime.Parse(dateTextBox.Text), true);
        }

        protected void invokeWeatherButton_Click(object sender, EventArgs e)
        {
            localhost1.Service1 service = new localhost1.Service1(); 
   
            string[] s = service.Weather5day(zipCodeTextBox.Text);

            for (int i = 0; i < s.Length; i++)
			{
                TextBox1.Text += "Day " + i +": " +s[i] + "\n";
			}

            
        }
    }
}